import React from "react";
import PageHeader from "../components/Header";
import Footer from "../components/Footer";
import "./globals.css";
import "./hover.css";
import { Metadata } from "next";
import { cn } from "@/lib/utils";
import Image from "next/image";
import { Inter as FontSans } from "next/font/google";
import { AntdRegistry } from "@ant-design/nextjs-registry";
import { ConfigProvider } from "antd";
import { antdTheme } from '../config/theme';

export const metadata: Metadata = {
  title: "知平-新一代物联网平台",
  description: "基于区块链的物联网平台",
  icons: {
    icon: "/zhiping/favicon.png",
    shortcut: '/zhiping/favicon.png'
  },
};

const fontSans = FontSans({
  subsets: ["latin"],
  variable: "--font-sans",
});

const RootLayout = ({ children }: React.PropsWithChildren) => {
  return (
    <html lang="zh">
      <body
        className={cn(
          "min-h-screen bg-background font-sans antialiased relative",
          fontSans.variable
        )}
      >
        <AntdRegistry>
          <ConfigProvider
            theme={{ // antd design 主题配置
              token: antdTheme,
            }}
          >
            {/* 头部菜单 */}
            <PageHeader />
            <div style={{ backgroundColor: '#f7f8f8', height: '100vh' }}>
              {children}
            </div>
            {/* <Footer /> */}
          </ConfigProvider>
        </AntdRegistry>
      </body>
    </html>
  );
}
export default RootLayout;
